package com.shopping;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSONObject;

public class TestJson {

	public static void main(String[] args) {
		JSONObject object = JSONObject.parseObject("{\"boolean\":true,\"string\":\"string\",\"list\":[1,2,3],\"int\":2}");
		
		String str = object.getString("string");
		boolean a = object.getBooleanValue("boolean");
		int i = object.getIntValue("int");
		List list = object.getJSONArray("list");

		System.out.println(list);
	}
}
